<template>
  <avue-form :option="option"
             v-model="form"
             :upload-error="uploadError"></avue-form>
</template>
<script>
export default {
  data () {
    return {
      form: {},
      option: {
        labelWidth: 120,
        column: [
          {
            label: '附件上传',
            prop: 'imgUrl',
            type: 'upload',
            listType: 'picture-card',
            span: 24,
            propsHttp: {
              res: 'data'
            },
            action: 'https://api.avuejs.com/imgupload'
          }
        ]
      }
    }
  },
  methods: {
    uploadError (error, column) {
      this.$message.success('上传失败回调')
      console.log(error, column)
    }
  }
}

</script>